#docker rmi -f dejavu/dejavu:3.5.1
docker pull dejavu/dejavu:3.5.1
rm -rf /cardone/docker/images/dejavu/dejavu_3.5.1.tar
mkdir -p /cardone/docker/images/dejavu
docker save dejavu/dejavu:3.5.1 > /cardone/docker/images/dejavu/dejavu_3.5.1.tar
#docker load < /cardone/docker/images/dejavu/dejavu_3.5.1.tar


docker node update --label-rm cardone-dejavu_dejavu cardone-01-01
docker node update --label-add cardone-dejavu_dejavu=true cardone-01-01

docker stack rm cardone-dejavu

docker stack deploy -c /cardone/middlewares/dejavu/prod.yml cardone-dejavu

for i in {1..10}  
do  
sleep $i

docker stack ps cardone-dejavu

docker service ls
done

docker service logs cardone-dejavu_dejavu -f --tail 300
